<form name="editForm">
    <div class="grid-parent grid-100 container" ng-show="!isAdvanced">
        <div class="grid-50">
            <input class="form-control" style="padding-left: 5px;" placeholder="ID /Bol# /PO# /Container# /reference# /seal#" ng-model="receipt.keyword" ng-keyup="keyUpSearch($event)"
            />
        </div>
        <div class="grid-30">
            &nbsp;
        </div>
        <div class="grid-10">
            <unis-waitting-btn ng-type="button" btn-class="blue" ng-click="_searchReceipts()" value="'Search'" is-loading="isLoading"></unis-waitting-btn>
        </div>
        <div class="grid-10">
            <unis-waitting-btn ng-type="button" btn-class=" yellow" ng-click="_exportReceipt()" value="'Export'" is-loading="isExporting"></unis-waitting-btn>
        </div>

    </div>
    <div class="grid-parent grid-100 container">
        <a ng-click="isAdvanced = !isAdvanced" style="font-weight:600;">
            <span ng-show="!isAdvanced">Advanced</span>
            <span ng-show="isAdvanced">Keyword</span> Search
        </a>
    </div>
    <div class="grid-parent grid-100 container" ng-if="isAdvanced">
        <div class="grid-parent grid-100 container">
            <div class="grid-25">
                <label class="label-input">Receipt ID</label>
                <lt-tags-input placeholder="Enter Receipt ID" fill="RN-" ng-model="receipt.receiptIds" ng-keyup="keyUpSearch($event)"></lt-tags-input>
            </div>
            <div class="grid-25">
                <label class="label-input">Entry ID</label>
                <input class="form-control" name="refNo" input-auto-fill="ET-" placeholder="Enter Entry ID" ng-model="receipt.entryId" ng-keyup="keyUpSearch($event)"
                />
            </div>
            <div class="grid-25" ng-hide="hideProperties && hideProperties.indexOf('status') >-1">
                <label class="label-input">Status</label>
                <ui-select multiple name="status" ng-model="receipt.statuses">
                    <ui-select-match>
                        {{$item}}
                    </ui-select-match>
                    <ui-select-choices repeat="item in statusList| filter: $select.search" refresh="getStatusList($select.search)" refresh-delay="500">
                        {{item}}
                    </ui-select-choices>
                </ui-select>
            </div>
            <div class="grid-25">
                <label class="label-input">Customer</label>
                <multiple-organization-auto-complete name="customer" ng-model="receipt.customerIds" tag="Customer"></multiple-organization-auto-complete>
            </div>

        </div>
        <div class="grid-parent grid-100 container">
            <div class="grid-25">
                <label class="label-input">Title</label>
                <multiple-organization-auto-complete name="title" ng-model="receipt.titleIds" tag="Title"></multiple-organization-auto-complete>
            </div>
            <div class="grid-25">
                <label class="label-input">Carrier</label>
                <multiple-organization-auto-complete name="carrier" ng-model="receipt.carrierIds" tag="Carrier"></multiple-organization-auto-complete>
            </div>
            <div class="grid-25">
                <label class="label-input">Container</label>
                <lt-tags-input placeholder="Enter Container" ng-model="receipt.containerNos" ng-keyup="keyUpSearch($event)"></lt-tags-input>
            </div>
            <div class="grid-25">
                <label class="label-input">Item:</label>
                <itemspec-auto-complete name="itemSpec" ng-model="receipt.itemSpecId" name="itemSpec" allow-clear="true" />
            </div>
        </div>

        <div class="grid-parent grid-100 container">
            <div class="grid-25">
                <label class="label-input">Appointment Time From</label>
                <lt-date-time value="receipt.appointmentTimeFrom" date-format="yyyy-mm-dd hh:ii" minute-step="60"></lt-date-time>
            </div>
            <div class="grid-25">
                <label class="label-input">Appointment Time To</label>
                <lt-date-time value="receipt.appointmentTimeTo" date-format="yyyy-mm-dd hh:ii" minute-step="60"></lt-date-time>
            </div>
            <div class="grid-25">
                <label class="label-input">ETA From</label>
                <lt-date-time value="receipt.etaFrom" date-format="yyyy-mm-dd hh:ii" minute-step="60"></lt-date-time>
            </div>
            <div class="grid-25">
                <label class="label-input">ETA To</label>
                <lt-date-time value="receipt.etaTo" date-format="yyyy-mm-dd hh:ii" minute-step="60"></lt-date-time>
            </div>
        </div>
        <div class="grid-parent grid-100 container">
            <div class="grid-25">
                <label class="label-input">Reference</label>
                <lt-tags-input placeholder="Enter Reference" ng-model="receipt.referenceNos" ng-keyup="keyUpSearch($event)"></lt-tags-input>
            </div>
            <div class="grid-25">
                <label class="label-input">PO</label>
                <lt-tags-input placeholder="Enter PO" ng-model="receipt.poNos" ng-keyup="keyUpSearch($event)"></lt-tags-input>
            </div>
            <div class="grid-25">
                <label class="label-input">BOL</label>
                <lt-tags-input placeholder="Enter BOL" ng-model="receipt.bolNos" ng-keyup="keyUpSearch($event)"></lt-tags-input>
            </div>
            <div class="grid-25">
                <label class="label-input">Seal</label>
                <lt-tags-input placeholder="Enter Seal" ng-model="receipt.sealNos" ng-keyup="keyUpSearch($event)"></lt-tags-input>
            </div>

        </div>
        <div class="grid-parent grid-100 container">
            <div class="col-md-12">
                <label class="label-input">SN List</label>
                <lt-tags-input enable-multiple-tag-input="true" placeholder="Enter SN List" ng-model="receipt.snList" ng-keyup="keyUpSearch($event)"></lt-tags-input>
            </div>
        </div>
        <div class="grid-parent grid-100 container">
            <div class="grid-25">
                <label class="label-input">Date Created From:</label>
                <lt-date-time value="receipt.createdWhenFrom"></lt-date-time>
            </div>
            <div class="grid-25">
                <label class="label-input">Date Created To:</label>
                <lt-date-time value="receipt.createdWhenTo"></lt-date-time>
            </div>
            <div class="grid-25">
                <label class="label-input">Created By</label>
                <ui-select ng-model="receipt.createdBy">
                    <ui-select-match allow-clear="true">
                        <div ng-bind="getUserName($select.selected)"></div>
                    </ui-select-match>
                    <ui-select-choices repeat="user.username as user in users | filter: $select.search" refresh="getUsers($select.search)" refresh-delay="50">
                        <div ng-bind="getUserName(user)"></div>
                    </ui-select-choices>
                </ui-select>
            </div>
            <div class="grid-25">
                <label class="label-input">Sort By:</label>
                <ui-select ng-model="receipt.expirationDate">
                    <ui-select-match allow-clear="true">
                        <div ng-bind="$select.selected"></div>
                    </ui-select-match>
                    <ui-select-choices repeat="item  in sorts | filter: $select.search">
                        <div ng-bind="item"></div>
                    </ui-select-choices>
                </ui-select>
            </div>
        </div>
        <div class="grid-parent grid-100 container">
            <div class="grid-25">
                <label class="label-input">Receipt Type</label>
                <ui-select ng-model="receipt.receiptType">
                    <ui-select-match allow-clear="true">
                        <div ng-bind="$select.selected"></div>
                    </ui-select-match>
                    <ui-select-choices repeat="item in ['Regular Receipt',
                        'Title Transfer Receipt', 'Migo Transfer Receipt', 'Inventory Receipt', 'CrossDock', 'Return', 'RDN'] | filter: $select.search">
                        <div ng-bind="item"></div>
                    </ui-select-choices>
                </ui-select>
            </div>
        </div>

        <div class="grid-parent grid-100 container">
            <div class="grid-parent grid-100 container">
                <div class="grid-80">
                    &nbsp;
                </div>
                <div class="grid-10">
                    <unis-waitting-btn ng-type="button" style="margin-left: 10px;" btn-class="yellow" ng-click="_exportReceipt()" value="'Export'"
                        is-loading="isExporting"></unis-waitting-btn>
                </div>
                <div class="grid-10">
                    <unis-waitting-btn ng-type="button" btn-class=" blue " ng-click="_searchReceipts()" value="'Search'" is-loading="isLoading"></unis-waitting-btn>

                </div>


            </div>
        </div>
</form>